<?php
// Set the content type to Javascript
header("Content-type: text/javascript");

// Disallow caching
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");

$array = array(
   "companyhome" => OC_Helper::linkToRoute('company_home'), 
   "companyinfourl" => OC_Helper::linkToRoute('company_employerinfo'), 
   "validateemailurl" => OC_Helper::linkToRoute("company_validateemail"),
   "validatenameurl" => OC_Helper::linkToRoute("company_validatename"),
   "validatesubdomainurl" => OC_Helper::linkToRoute("company_validatesubdomain"),
   "showcaptchaurl" => OC_Helper::linkToRoute('company_showcaptcha'),
   "getvcodeurl" => OC_Helper::linkToRoute("company_getvcode"),
   "getcityurl" => OC_Helper::linkToRoute("city_listc"),
   "getprovinceurl" => OC_Helper::linkToRoute("city_listp"),
   "loginurl" => OC_Helper::linkToRoute("company_login"),
   "getlogourl" => OC_Helper::linkToRoute("company_getlogo"),
   "serverDomain"=>PUtil::serverDomain(),
   "redirect_url" => OC_Helper::linkToRoute('company_login'),
   "setautoaction" => OC_Helper::linkToRoute('company_setautoaction')
);

// Echo it
foreach ($array as  $setting => $value) {
   echo("var ". $setting ."=\"".$value."\";\n");
}
